<template>
  <div class="gl_contentBox gl_heightFull">
    <el-tabs v-model="activeTab" type="card" class="gl_tabs">
      <el-tab-pane v-for="(item, index) in tabList" :key="index" :label="item.label" :name="item.name">
        <component :is="item.component" v-if="activeTab === item.name" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import declarelist from './declare/declarelist.vue';
import joinlist from './join/joinlist.vue';
export default {
  data () {
    return {
      activeTab: '',
      tabList: [
        {
          label: '已申报考试',
          name: 'declarelist',
          productStatus: 'declarelist',
          component: declarelist
        },
        {
          label: '可参加考试',
          name: 'joinlist',
          productStatus: 'joinlist',
          component: joinlist
        }
      ]
    };
  },
  created() {
    this.activeTab = this.$route.query.type && this.$route.query.type === 'join' ? 'joinlist' : 'declarelist';
  },
  methods: {
    tabClick() {}
  }
};
</script>

<style>

</style>
